package com.spring.controller;


import com.spring.pojo.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;


// @ResponseBody+@Controller  = @RestController
@RestController
public class RestfulController {

    @GetMapping("/user/{id}")
    public String getuser(@PathVariable Integer id){
        return  "get"+id;
    }


    @PostMapping("/user")
    public String postuser(){
        return  "post";
    }

    @DeleteMapping("/user/{id}")
    public String postuser(@PathVariable int id){
        return "delete"+id ;
    }

    @PutMapping("/user/{id}")
    public String putuser(@PathVariable int id){
        return "update"+id ;
    }


}
